const { contextBridge, ipcRenderer } = require('electron/renderer')

contextBridge.exposeInMainWorld('electronAPI', {
    runPython: (code) => ipcRenderer.send('run-python', code),
    openFile: () => ipcRenderer.invoke('dialog:openFile'),
    setUseExternalPy: (state) => ipcRenderer.send('set-use-external-py',state),
    setPyExternalPath: (pyPath) => ipcRenderer.send('set-py-external-path',pyPath)
})